package br.com.array.android.ma.view;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import br.com.array.android.ma.R;
import br.com.array.android.ma.model.ItemAlertaModel;

/**
 * Created by leonardo.neves on 14/07/2014.
 */
public class AlarmeActivity extends Activity {

    public static final String TITULO = "titulo";
    public static final String MODELO = "modelo";

    private TextView viewTitulo;
    private TextView viewData;


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.alarme_activity);

        viewTitulo = (TextView) findViewById(R.id.textViewAlarme);
        viewData = (TextView) findViewById(R.id.textViewData);

        ItemAlertaModel model = (ItemAlertaModel) getIntent().getSerializableExtra(MODELO);
        String titulo = getIntent().getStringExtra(TITULO);

        if (titulo != null && model != null) {
            viewTitulo.setText(titulo);
            viewData.setText(model.getData());
        }
    }
}